import type { LogRegResult } from "@/type/login"
import { http } from "./http"

export  const log =async (username:string,password:string)=> {
    
   const res=await http<LogRegResult>({method:"get",url:"/login",data:{account:username,password:password}})
   return res as LogRegResult
}
export  const reg =async (username:string,password:string)=> {
   const res=await http<LogRegResult>({method:'post',url:"/register",data:{account:username,password:password}})
   return res as LogRegResult
}